class DailySongsData {
  num code;
  List<Recommend> recommend;

  DailySongsData({this.code, this.recommend});

  DailySongsData.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    if (json['recommend'] != null) {
      recommend = new List<Recommend>();
      json['recommend'].forEach((v) {
        recommend.add(new Recommend.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    if (this.recommend != null) {
      data['recommend'] = this.recommend.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Recommend {
  String name;
  num id;
  num position;
  num status;
  num fee;
  num copyrightId;
  String disc;
  num no;
  List<Artists> artists;
  Album album;
  bool starred;
  num popularity;
  num score;
  num starredNum;
  num duration;
  num playedNum;
  num dayPlays;
  num hearTime;
  String copyFrom;
  String commentThreadId;
  num ftype;
  num copyright;
  num mark;
  HMusic hMusic;
  HMusic mMusic;
  HMusic lMusic;
  HMusic bMusic;
  num mvid;
  num rtype;
  String reason;
  Privilege privilege;
  String alg;

  Recommend({
    this.name,
    this.id,
    this.position,
    this.status,
    this.fee,
    this.copyrightId,
    this.disc,
    this.no,
    this.artists,
    this.album,
    this.starred,
    this.popularity,
    this.score,
    this.starredNum,
    this.duration,
    this.playedNum,
    this.dayPlays,
    this.hearTime,
    this.copyFrom,
    this.commentThreadId,
    this.ftype,
    this.copyright,
    this.mark,
    this.hMusic,
    this.mMusic,
    this.lMusic,
    this.bMusic,
    this.mvid,
    this.rtype,
    this.reason,
    this.privilege,
    this.alg,
  });

  Recommend.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    id = json['id'];
    position = json['position'];
    status = json['status'];
    fee = json['fee'];
    copyrightId = json['copyrightId'];
    disc = json['disc'];
    no = json['no'];
    if (json['artists'] != null) {
      artists = new List<Artists>();
      json['artists'].forEach((v) {
        artists.add(new Artists.fromJson(v));
      });
    }
    album = json['album'] != null ? new Album.fromJson(json['album']) : null;
    starred = json['starred'];
    popularity = json['popularity'];
    score = json['score'];
    starredNum = json['starredNum'];
    duration = json['duration'];
    playedNum = json['playedNum'];
    dayPlays = json['dayPlays'];
    hearTime = json['hearTime'];
    copyFrom = json['copyFrom'];
    commentThreadId = json['commentThreadId'];
    ftype = json['ftype'];
    copyright = json['copyright'];
    mark = json['mark'];
    hMusic =
        json['hMusic'] != null ? new HMusic.fromJson(json['hMusic']) : null;
    mMusic =
        json['mMusic'] != null ? new HMusic.fromJson(json['mMusic']) : null;
    lMusic =
        json['lMusic'] != null ? new HMusic.fromJson(json['lMusic']) : null;
    bMusic =
        json['bMusic'] != null ? new HMusic.fromJson(json['bMusic']) : null;
    mvid = json['mvid'];
    rtype = json['rtype'];
    reason = json['reason'];
    privilege = json['privilege'] != null
        ? new Privilege.fromJson(json['privilege'])
        : null;
    alg = json['alg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['id'] = this.id;
    data['position'] = this.position;
    data['status'] = this.status;
    data['fee'] = this.fee;
    data['copyrightId'] = this.copyrightId;
    data['disc'] = this.disc;
    data['no'] = this.no;
    if (this.artists != null) {
      data['artists'] = this.artists.map((v) => v.toJson()).toList();
    }
    if (this.album != null) {
      data['album'] = this.album.toJson();
    }
    data['starred'] = this.starred;
    data['popularity'] = this.popularity;
    data['score'] = this.score;
    data['starredNum'] = this.starredNum;
    data['duration'] = this.duration;
    data['playedNum'] = this.playedNum;
    data['dayPlays'] = this.dayPlays;
    data['hearTime'] = this.hearTime;
    data['copyFrom'] = this.copyFrom;
    data['commentThreadId'] = this.commentThreadId;
    data['ftype'] = this.ftype;
    data['copyright'] = this.copyright;
    data['mark'] = this.mark;
    if (this.hMusic != null) {
      data['hMusic'] = this.hMusic.toJson();
    }
    if (this.mMusic != null) {
      data['mMusic'] = this.mMusic.toJson();
    }
    if (this.lMusic != null) {
      data['lMusic'] = this.lMusic.toJson();
    }
    if (this.bMusic != null) {
      data['bMusic'] = this.bMusic.toJson();
    }
    data['mvid'] = this.mvid;
    data['rtype'] = this.rtype;
    data['reason'] = this.reason;
    if (this.privilege != null) {
      data['privilege'] = this.privilege.toJson();
    }
    data['alg'] = this.alg;
    return data;
  }
}

class Artists {
  String name;
  num id;
  num picId;
  num img1v1Id;
  String briefDesc;
  String picUrl;
  String img1v1Url;
  num albumSize;
  String trans;
  num musicSize;
  num topicPerson;

  Artists(
      {this.name,
      this.id,
      this.picId,
      this.img1v1Id,
      this.briefDesc,
      this.picUrl,
      this.img1v1Url,
      this.albumSize,
      this.trans,
      this.musicSize,
      this.topicPerson});

  Artists.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    id = json['id'];
    picId = json['picId'];
    img1v1Id = json['img1v1Id'];
    briefDesc = json['briefDesc'];
    picUrl = json['picUrl'];
    img1v1Url = json['img1v1Url'];
    albumSize = json['albumSize'];
    trans = json['trans'];
    musicSize = json['musicSize'];
    topicPerson = json['topicPerson'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['id'] = this.id;
    data['picId'] = this.picId;
    data['img1v1Id'] = this.img1v1Id;
    data['briefDesc'] = this.briefDesc;
    data['picUrl'] = this.picUrl;
    data['img1v1Url'] = this.img1v1Url;
    data['albumSize'] = this.albumSize;
    data['trans'] = this.trans;
    data['musicSize'] = this.musicSize;
    data['topicPerson'] = this.topicPerson;
    return data;
  }
}

class Album {
  String name;
  num id;
  String type;
  num size;
  num picId;
  String blurPicUrl;
  num companyId;
  num pic;
  String picUrl;
  num publishTime;
  String description;
  String tags;
  String company;
  String briefDesc;
  num status;
  num copyrightId;
  String commentThreadId;
  List<Artists> artists;
  String subType;
  num mark;
  String picIdStr;

  Album(
      {this.name,
      this.id,
      this.type,
      this.size,
      this.picId,
      this.blurPicUrl,
      this.companyId,
      this.pic,
      this.picUrl,
      this.publishTime,
      this.description,
      this.tags,
      this.company,
      this.briefDesc,
      // Artists artist,
      // this.songs,
      // this.alias,
      this.status,
      this.copyrightId,
      this.commentThreadId,
      this.artists,
      this.subType,
      // this.transName,
      this.mark,
      this.picIdStr});

  Album.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    id = json['id'];
    type = json['type'];
    size = json['size'];
    picId = json['picId'];
    blurPicUrl = json['blurPicUrl'];
    companyId = json['companyId'];
    pic = json['pic'];
    picUrl = json['picUrl'];
    publishTime = json['publishTime'];
    description = json['description'];
    tags = json['tags'];
    company = json['company'];
    briefDesc = json['briefDesc'];
    status = json['status'];
    copyrightId = json['copyrightId'];
    commentThreadId = json['commentThreadId'];
    if (json['artists'] != null) {
      artists = new List<Artists>();
      json['artists'].forEach((v) {
        artists.add(new Artists.fromJson(v));
      });
    }
    subType = json['subType'];
    mark = json['mark'];
    picIdStr = json['picIdstr'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['id'] = this.id;
    data['type'] = this.type;
    data['size'] = this.size;
    data['picId'] = this.picId;
    data['blurPicUrl'] = this.blurPicUrl;
    data['companyId'] = this.companyId;
    data['pic'] = this.pic;
    data['picUrl'] = this.picUrl;
    data['publishTime'] = this.publishTime;
    data['description'] = this.description;
    data['tags'] = this.tags;
    data['company'] = this.company;
    data['briefDesc'] = this.briefDesc;
    data['status'] = this.status;
    data['copyrightId'] = this.copyrightId;
    data['commentThreadId'] = this.commentThreadId;
    if (this.artists != null) {
      data['artists'] = this.artists.map((v) => v.toJson()).toList();
    }
    data['subType'] = this.subType;
    data['mark'] = this.mark;
    data['picIdstr'] = this.picIdStr;
    return data;
  }
}

class HMusic {
  String name;
  num id;
  num size;
  String extension;
  num sr;
  num dfsId;
  num bitrate;
  num playTime;
  num volumeDelta;

  HMusic(
      {this.name,
      this.id,
      this.size,
      this.extension,
      this.sr,
      this.dfsId,
      this.bitrate,
      this.playTime,
      this.volumeDelta});

  HMusic.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    id = json['id'];
    size = json['size'];
    extension = json['extension'];
    sr = json['sr'];
    dfsId = json['dfsId'];
    bitrate = json['bitrate'];
    playTime = json['playTime'];
    volumeDelta = json['volumeDelta'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['id'] = this.id;
    data['size'] = this.size;
    data['extension'] = this.extension;
    data['sr'] = this.sr;
    data['dfsId'] = this.dfsId;
    data['bitrate'] = this.bitrate;
    data['playTime'] = this.playTime;
    data['volumeDelta'] = this.volumeDelta;
    return data;
  }
}

class Privilege {
  num id;
  num fee;
  num payed;
  num st;
  num pl;
  num dl;
  num sp;
  num cp;
  num subp;
  bool cs;
  num maxbr;
  num fl;
  bool toast;
  num flag;
  bool preSell;

  Privilege(
      {this.id,
      this.fee,
      this.payed,
      this.st,
      this.pl,
      this.dl,
      this.sp,
      this.cp,
      this.subp,
      this.cs,
      this.maxbr,
      this.fl,
      this.toast,
      this.flag,
      this.preSell});

  Privilege.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    fee = json['fee'];
    payed = json['payed'];
    st = json['st'];
    pl = json['pl'];
    dl = json['dl'];
    sp = json['sp'];
    cp = json['cp'];
    subp = json['subp'];
    cs = json['cs'];
    maxbr = json['maxbr'];
    fl = json['fl'];
    toast = json['toast'];
    flag = json['flag'];
    preSell = json['preSell'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['fee'] = this.fee;
    data['payed'] = this.payed;
    data['st'] = this.st;
    data['pl'] = this.pl;
    data['dl'] = this.dl;
    data['sp'] = this.sp;
    data['cp'] = this.cp;
    data['subp'] = this.subp;
    data['cs'] = this.cs;
    data['maxbr'] = this.maxbr;
    data['fl'] = this.fl;
    data['toast'] = this.toast;
    data['flag'] = this.flag;
    data['preSell'] = this.preSell;
    return data;
  }
}
